import { Entity, PrimaryGeneratedColumn, Column } from "typeorm";
import { Attachment } from "../class/Attachment";

@Entity("mails")
export class Mail {

    @PrimaryGeneratedColumn()
    id: number;

    @Column()
    role_id: number;

    @Column()
    from_type: number;

    @Column()
    title: string;

    @Column()
    content: string;

    @Column("simple-json")
    attachment: Attachment;

    @Column()
    read: boolean;

    @Column()
    created_at: string;

    @Column()
    updated_at: string;
}
